<script lang="ts" setup>
import {ref,watch} from "vue";
import {getSecKillProApi} from "@/api/pro"
import mytable from "@/myLib/mytable";


const columns = [
    {
        label: '商品编号',
        prop: 'proid',
        width:"180px"
    },
    {
        label: '商品名称',
        prop: 'proname',
        width:"500px"
    },
    {
        label: '价格',
        prop: 'originprice',
        width:"180px"
    }
]


const flag = ref("1");

const getProFn = ()=>getSecKillProApi({flag:flag.value});

const tableRef = ref();

</script>

<template>
    <span>是否启用：</span><el-switch v-model="flag" active-value="1" inactive-value="0" />
    <mytable ref="tableRef" :getDataApi="getProFn"  :columns="columns" :flag="flag"  ></mytable>
</template>

<style lang="scss" scoped>
    
</style>
